home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / NIWRAS / OEMSETUP.INF < prev    next >
INI File  |  1996-07-31  |  51KB  |  1,308 lines

  1. ;***********************************************************************
  2. ; Niwot Networks NiwRAS Digital Transport WindowsNT Setup File. 
  3. ; Rev1P2 04/05/96  WAG Leased Lines ARE supported
  4. ;***********************************************************************
  5. [Identification]
  6.     OptionType = NetAdapter
  7.  
  8. [DebugVars]
  9.     STF_DISPLAYDEBUGCONTROL = 1
  10.  
  11. ;***********************************************************************
  12. ;
  13. ;***********************************************************************
  14. [PlatformsSupported]
  15.     ISA
  16.     EISA
  17.     "Jazz-Internal Bus"
  18.  
  19. ;***********************************************************************
  20. ;
  21. ;***********************************************************************
  22. [Options]
  23.     NiwRAS
  24.  
  25. ;***********************************************************************
  26. ;
  27. ;***********************************************************************
  28. [FileConstants]
  29.     InfName                 = "OEMNIWOT.INF"
  30.     UtilityInf              = "UTILITY.INF"
  31.     ParamInf                = "NCPARAM.INF"
  32.     subroutineinf           = "SUBROUTN.INF"
  33.     SoftwareType            = "driver"
  34.     Exit_Code               = 0
  35.     NetEventDLL             = "%SystemRoot%\System32\netevent.dll"
  36.     IoLogMsgDLL             = "%SystemRoot%\System32\IoLogMsg.dll"
  37.     Manufacturer            = "Niwot Networks"
  38.     ProductMajorVersion     = "3"
  39.     ProductMinorVersion     = "1"
  40.     ProductVersion          = $(ProductMajorVersion)"."$(ProductMinorVersion)
  41.     ProductSoftwareName     = "NiwRAS"
  42.     ProductSoftwareImagePath = "\SystemRoot\System32\drivers\NiwRAS.sys"
  43.     NetRuleSoftwareType     = "NiwRASSys NiwRASDriver"
  44.     NetRuleSoftwareUse      = $(SoftwareType)
  45.     NetRuleSoftwareBindForm = """NiwRASSys"" yes no container"
  46.     NetRuleSoftwareClass    = {"NiwRASDriver basic"}
  47.     NetRuleSoftwareBindable = {"NiwRASDriver NiwRASAdapter non exclusive 100"}
  48.     ProductHardwareName     = "NiwRAS"
  49.     NetRuleHardwareBindForm = " yes yes container"
  50.     NetRuleHardwareNiwRASType = "NiwRAS NiwRASAdapter"
  51.     NetRuleHardwareNiwRASClass = {"NiwRASAdapter basic"}
  52.     BindableNiwRASTxt      = {"NiwRASDriver NiwRASAdapter non exclusive 100"}
  53.     DeviceMap               = "HARDWARE\DEVICEMAP"
  54.     TapiDevices             = "TAPI DEVICES"
  55.     TapiDeviceKey           = $(ProductHardwareName)
  56.     TapiMediaType           = "Sync_"
  57.     ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
  58.                               $(ProductSoftwareName)"\CurrentVersion"
  59.     ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+
  60.                               "\Parameters"
  61.  
  62.  
  63.     LineType                = 0
  64.  
  65. ;   FIXME - Set to zero before release
  66.     DebugFlags              = 0
  67.  
  68.     IOADDR_Addr_List = {640,656, 736, 768, 848, 896}
  69.     Interrupt_List   = {2, 10, 11, 12, 15}
  70.     DMA_Channel_List = {0, 1, 3, 5, 6, 7}
  71.     ClockSpeedList = {0, 56, 64, 112, 128, 384, 512, 768, 1000, 2500, 5000}
  72.     
  73.     DMAChannel = 6                 ; Default value
  74.  
  75.     IOBaseValue = 0x380            ; Default value
  76.  
  77.     InterruptNumber = 10        ; Default value
  78.  
  79.     ClockSpeed = 0                ; Default value
  80.  
  81.     Port1TypeList  = {Dial, Leased}
  82.     Port2TypeList  = {Disabled}
  83.  
  84.     Rate_Strings            = {"57.6 kbps", "38.4 kbps", "19.2 kpbs", "9.6 kbps", "Max kbps"}
  85.     Line_Rates              = {1, 2, 3, 4, 0}
  86.     LineRate                = 1
  87.  
  88. ;***********************************************************************
  89. ;
  90. ;***********************************************************************
  91. [GeneralConstants]
  92.     from                    = ""
  93.     to                      = ""
  94.     ExitCodeOk              = 0
  95.     ExitCodeCancel          = 1
  96.     ExitCodeFatal           = 2
  97.     KeyNull                 = ""
  98.     MAXIMUM_ALLOWED         = 33554432
  99.     RegistryErrorIndex      = NO_ERROR
  100.     KeyProduct              = ""
  101.     KeyParameters           = ""
  102.     TRUE                    = 1
  103.     FALSE                   = 0
  104.     NoTitle                 = 0
  105.     ExitState               = "Active"
  106.     OldVersionExisted       = $(FALSE)
  107.     DriverPath              = $(!STF_NTPATH)\drivers
  108.  
  109. ;***********************************************************************
  110. ;
  111. ;***********************************************************************
  112. [Date]
  113.     Now                     = {} ? $(!LIBHANDLE) GetSystemDate
  114.  
  115. ;***********************************************************************
  116. ;
  117. ;***********************************************************************
  118. [Identify]
  119.     Read-Syms Identification
  120.     Set Status      = STATUS_SUCCESSFUL
  121.     Set Identifier  = $(OptionType)
  122.     Set Media       = #("Source Media Descriptions", 1, 1)
  123.     Return $(Status) $(Identifier) $(Media)
  124.  
  125. ;***********************************************************************
  126. ;
  127. ;***********************************************************************
  128. [ReturnOptions]
  129.     Set Status          = STATUS_FAILED
  130.     Set OptionList      = {}
  131.     Set OptionTextList  = {}
  132.     Set LanguageList    = ^(LanguagesSupported, 1)
  133.  
  134.     IfContains(i) $($0) in $(LanguageList)
  135.         IfStr(i) $($1) == ""
  136.             GoTo SetOptions
  137.         EndIf
  138.         Set PlatformList = ^(PlatformsSupported, 1)
  139.         IfContains(i) $($1) in $(PlatformList)
  140.             GoTo SetOptions
  141.         Else
  142.             Set Status = STATUS_NOTSUPPORTED
  143.             GoTo ExitReturnOptions
  144.         EndIf
  145.     Else
  146.         Set Status = STATUS_NOLANGUAGE
  147.         GoTo ExitReturnOptions
  148.     EndIf
  149.  
  150. SetOptions = +
  151.     Set OptionList     = ^(Options, 1)
  152.     Set OptionTextList = ^(OptionsText$($0), 1)
  153.     Set Status         = STATUS_SUCCESSFUL
  154.  
  155. ExitReturnOptions = +
  156.     Return $(Status) $(OptionList) $(OptionTextList)
  157.  
  158. ;***********************************************************************
  159. ;
  160. ;***********************************************************************
  161. [InstallOption]
  162.     Set Status   = STATUS_FAILED
  163.     Set Option   = $($1)
  164.     Set SrcDir   = $($2)
  165.     Set RasDir   = $($2)
  166.     Set AddCopy  = $($3)
  167.     Set DoCopy   = $($4)
  168.     Set DoConfig = $($5)
  169.     Set LanguageList = ^(LanguagesSupported, 1)
  170.  
  171.     IfContains(i) $($0) NOT-IN $(LanguageList)
  172.         Return STATUS_NOLANGUAGE
  173.     EndIf
  174.     ;
  175.     ; FIXME - make sure this flag is disabled before shipping
  176.     ;
  177.     Set OldDebugControl = $(!DebugOutputControl)
  178.     ; 1 is for debug
  179.     ;Set !DebugOutputControl = 1
  180.     Set !DebugOutputControl = 0
  181.  
  182.     Set-Subst LF = "\n"
  183.  
  184.     Read-Syms GeneralConstants
  185.     Read-Syms FileConstants
  186.     Read-Syms DialogConstants$(!STF_LANGUAGE)
  187.  
  188.     IfStr(i) $(!NTN_Origination) == "NCPA"
  189.         Set Continue = $(OK)
  190.     EndIf
  191.  
  192.     Read-Syms FileConstants$(!STF_LANGUAGE)
  193. ;WHQL
  194.     SetHelpFile "NIWHELP.HLP" 10 100
  195.  
  196.     Detect Date
  197.     Set-Title  $(FunctionTitle)$(Option)
  198.  
  199.     Set to   = Begin
  200.     Set from = Begin
  201.     Set CommonStatus = STATUS_SUCCESSFUL
  202.  
  203.     EndWait
  204.  
  205. ;***********************************************************************
  206. ;
  207. ;***********************************************************************
  208. Begin = +
  209.     Set ActivateDetection = FALSE
  210.     IfStr(i) $(!NTN_InstallMode) == deinstall
  211.         Set StartLabel = RemoveAdapter
  212.     Else-IfStr(i) $(!NTN_InstallMode) == Update
  213.         Set StartLabel = UpgradeSoftware
  214.     Else-IfStr(i) $(!NTN_InstallMode) == bind
  215.         Set StartLabel = BindingAdapter
  216.     Else-IfStr(i) $(!NTN_InstallMode) == configure
  217.         Set StartLabel = ConfigureAdapter
  218.         Set ActivateDetection = TRUE
  219.         Set CommonStatus = STATUS_REBOOT
  220.         IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  221.             Debug-Output $(InfName)": Cannot configure the EtherWORKS 3 driver software."
  222.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  223.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  224.                 Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  225.                 GoTo ShellCodeError
  226.             EndIf
  227.             Set Error = $($R0)
  228.             Set from = end
  229.             Set to = end
  230.             GoTo NonFatalInfo
  231.         EndIf
  232.     Else
  233.         Set StartLabel = InstallAdapter
  234.         Set ActivateDetection = TRUE
  235.         Set OEM_ABANDON_OPTIONS = {}
  236.         Set OEM_ABANDON_SOFTWARE = FALSE
  237.         Set OEM_ABANDON_ON = TRUE
  238.     EndIf
  239.  
  240.     Debug-Output $(InfName)": =================================================="
  241.     Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
  242.     Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
  243.     Debug-Output $(InfName)": Option is: "$(Option)
  244.     Debug-Output $(InfName)": !STF_NCDETECT  is: "$(!STF_NCDETECT)
  245.     Debug-Output $(InfName)": !STF_NCOPTION  is: "$(!STF_NCOPTION)
  246.     Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  247.     Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  248.     Debug-Output $(InfName)": =================================================="
  249.  
  250.     Set DetectedCard = FALSE
  251.     IfStr(i) $(ActivateDetection) != TRUE
  252.         GoTo $(StartLabel)
  253.     EndIf
  254.  
  255.     Debug-Output $(InfName)": Calling Param_SetDefaults"
  256.     Shell $(ParamInf) Param_SetDefaults {}
  257.  
  258.     Shell $(ParamInf) HexListFromDecList $(IOADDR_Addr_List)
  259.     Set IOADDR_Hex_List = $($R0)
  260.  
  261.     IfStr(i) $(!STF_NCDETECT) == YES
  262.         IfStr(i) $(!STF_NCOPTION) == $(Option)
  263.            Set DetectedCard = TRUE
  264.            Debug-Output $(InfName)": Setting DetectedCard to TRUE"
  265.         EndIf
  266.     EndIf
  267.  
  268.     Shell "" DebugConfiguration "After parameter querying"
  269.     Set from = FatalError
  270.     Set to = FatalError
  271.     GoTo $(StartLabel)
  272.  
  273. ;***********************************************************************
  274. ;
  275. ;***********************************************************************
  276. InstallAdapter = +
  277.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  278.     IfStr $(KeyProduct) != $(KeyNull)
  279.         CloseRegKey $(KeyProduct)
  280.         IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
  281.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  282.                $(ProductVersion)
  283.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  284.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  285.                GoTo ShellCodeError
  286.            EndIf
  287.            GoTo end
  288.         Else
  289.            Shell $(UtilityInf), CardExistedDlg
  290.            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  291.                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  292.                GoTo ShellCodeError
  293.            EndIf
  294.            IfStr(i) $($R1) != "OK"
  295.                Set CommonStatus = STATUS_USERCANCEL
  296.                GoTo end
  297.            EndIf
  298.            Set OldVersionExisted = $(TRUE)
  299.         EndIf
  300.     EndIf
  301.  
  302.     Set CurrParamSettings = {}
  303.     IfStr(i) $(DetectedCard) != TRUE
  304.         GoTo AdapterSetup
  305.     EndIf
  306.  
  307.     StartWait
  308.         Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  309.     EndWait
  310.  
  311.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  312.         GoTo AdapterSetup
  313.     EndIf
  314.  
  315.     Set DetectedParams = $($R1)
  316.     Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
  317.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  318.     GoTo AdapterSetup
  319.  
  320. ;***********************************************************************
  321. ;
  322. ;***********************************************************************
  323. ConfigureAdapter = +
  324.     IfStr $(KeyProduct) == $(KeyNull)
  325.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  326.         IfStr $(KeyProduct) == $(KeyNull)
  327.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  328.             Debug-Output $(InfName)": Cannot find component product key"
  329.             GoTo FatalRegistry
  330.         EndIf
  331.     EndIf
  332.  
  333.     Debug-Output $(InfName)": Shelling to FindService"
  334.     Shell $(UtilityInf) FindService, $(KeyProduct)
  335.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  336.         Debug-Output $(InfName)": FindService shell failure"
  337.         GoTo ShellCodeError
  338.     EndIf
  339.     IfStr(i) $($R0) != NO_ERROR
  340.         Debug-Output $(InfName)": FindService Shell error: "$($R0)
  341.         GoTo FatalRegistry
  342.     EndIf
  343.  
  344.     Set KeyParameters = $($R2)
  345.     CloseRegKey $($R1)
  346.     IfStr $(KeyParameters) == $(KeyNull)
  347.         Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  348.         Debug-Output $(InfName)": Cannot find component service"
  349.         GoTo FatalRegistry
  350.     EndIf
  351.  
  352.     Set OldVersionExisted = $(TRUE)
  353.     Set ValueName = ""
  354.     Set ValueData = ""
  355.     Set ValueStr  = ""
  356.     Set ValueList = {}
  357.     EnumRegValue $(KeyParameters) ValueList
  358.     ForListDo $(ValueList)
  359.         Set ValueItem = $($)
  360.         Set ValueName = *($(ValueItem),1)
  361.         Set ValueData = *($(ValueItem),4)
  362.         Debug-Output $(InfName)": "$(ValueName)"="$(ValueData)
  363.         IfStr(i) $(ValueName) == "AddressList"
  364.             Set TapiAddressList = $(ValueData)
  365.         Else-IfStr(i) $(ValueName) == "BusNumber"
  366.             Set BusNumber = $(ValueData)
  367.         Else-IfStr(i) $(ValueName) == "BusType"
  368.             Set BusType = $(ValueData)
  369.         Else-Ifstr(i) $(ValueName) == "ClockSpeed"
  370.             set ClockSpeed = $(ValueData)
  371.         Else-Ifstr(i) $(ValueName) == "DeviceName"
  372.             set ProductHardwareName = $(ValueData)
  373.         Else-Ifstr(i) $(ValueName) == "DMAChannel"
  374.             set DMAChannel = $(ValueData)
  375.         Else-IfStr(i) $(ValueName) == "InterruptNumber"
  376.             Set InterruptNumber = $(ValueData)
  377.         Else-IfStr(i) $(ValueName) == "IOBaseAddress"
  378.             Set IOBaseValue = $(ValueData)
  379.         Else-IfStr(i) $(ValueName) == "LineRate"
  380.             Set LineRate = $(ValueData)
  381.         Else-IfStr(i) $(ValueName) == "LineType"
  382.             Set LineType = $(ValueData)
  383.         Else-IfStr(i) $(ValueName) == "MediaType"
  384.             Set MediaType = $(ValueData)
  385.            Else-IfStr(i) $(ValueName) == "Port1Type"
  386.             Set Port1Type = $(ValueData)
  387.         Else-IfStr(i) $(ValueName) == "Port2Type"
  388.             Set Port2Type = $(ValueData)
  389.         EndIf
  390.     EndForListDo
  391.     Shell $(ParamInf) Param_SaveValues
  392.     Set CurrParamSettings = $($R0)
  393.  
  394. ;***********************************************************************
  395. ;
  396. ;***********************************************************************
  397. AdapterSetup = +
  398.     Shell "" DebugConfiguration "before displaying dialog"
  399.     Set from = AdapterOptions
  400.  
  401.     Shell $(ParamInf) Param_ParameterConfidence
  402.     IfStr(i) $($R0) != STATUS_SUCCESSFUL
  403.         Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
  404.         GoTo AdapterOptions
  405.     EndIf
  406.     IfStr(i) $(DetectedCard) == TRUE
  407.         IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
  408.             GoTo AdapterVerify
  409.         EndIf
  410.     EndIf
  411.  
  412. ;***********************************************************************
  413. ;
  414. ;***********************************************************************
  415. AdapterOptions = + 
  416.     set IOBaseAddress = *($(IOADDR_Hex_List), ~($(IOADDR_Addr_List),+
  417.         $(IOBaseValue)))
  418.     Read-Syms FileDependentDlg$(!STF_LANGUAGE)
  419.     UI Start "InputDlg"
  420.     IfStr(i) $(DLGEVENT) == "CONTINUE"
  421.         Set InterruptNumber = $(Combo1Out)
  422.         Set IOBaseAddress = $(Combo2Out)
  423.         ;Set IOBaseAddress = *($(IOADDR_Addr_List), ~($(IOADDR_Hex_List),$(IOADDR_Hex_Value)))
  424.         Set DMAChannel = $(Combo3Out)
  425.         Set RateString = $(Combo4Out)
  426.         Set LineRate = *($(Line_Rates), ~($(Rate_Strings),$(RateString)))
  427.         Set Port1TypeString = $(Combo5Out)
  428.         Set Port2TypeString = $(Combo6Out)
  429.         ui pop 1
  430.     Else-IfStr(i) $(DLGEVENT) == "BACK"
  431.         Set CommonStatus = STATUS_USERCANCEL
  432.         Debug-Output $(InfName)": Action: exit. Bye."
  433.         ui pop 1
  434.         GoTo end
  435.     Else
  436.         Debug-Output $(InfName)": Action: unknown. Bye."
  437.         ui pop 1
  438.         GoTo end
  439.     EndIf
  440.     IfStr(i) $(!STF_NCDETINFO) == {}
  441.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusType) $(BusNumber)
  442.         ifInt $($ShellCode) != $(!SHELL_CODE_OK)
  443.             Debug-Output $(InfName)": ShellCode error."
  444.             GoTo ShellCodeError
  445.         EndIf
  446.         Set BusType = $($R1)
  447.         Set BusNumber = $($R2)
  448.     Else
  449.         Set BusType = *($(!STF_NCDETINFO),5)
  450.         Set BusNumber = *($(!STF_NCDETINFO),6)
  451.     EndIf
  452.     Read-Syms CardDependentDlg$(!STF_LANGUAGE)
  453.     ui start "InputDlg"
  454.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  455.         set ClockSpeed = $(Combo1Out)
  456.         set Port1Type = $(Combo2Out)
  457.         set Port2Type = $(Combo3Out)
  458.         ui pop 1
  459.     else-ifstr(i) $(DLGEVENT) == "BACK"
  460.         set CommonStatus = STATUS_USERCANCEL
  461.         Debug-Output "Action: exit. Bye."
  462.         ui pop 1
  463.         goto end
  464.     else
  465.         ui pop 1
  466.         Debug-Output "Action: unknown. Bye."
  467.         goto end
  468.     endif
  469.  
  470. ;***********************************************************************
  471. ;
  472. ;***********************************************************************
  473. AdapterVerify = +
  474.     Shell "" DebugConfiguration "after running dialog"
  475.     IfStr(i) $(DetectedCard) != TRUE
  476.         Shell $(ParamInf) Param_SaveValues
  477.         Set NewParamSettings = $($R0)
  478.         IfStr(i) $(CurrParamSettings) == {}
  479.             Set DiffParamSettings = $(NewParamSettings)
  480.         Else
  481.             Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  482.             Set DiffParamSettings = $($R0)
  483.         EndIf
  484.         Debug-Output $(InfName)": Calling Param_VerifyResources"
  485.         Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  486.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  487.             Debug-Output $(InfName)": Param_VerifyResources succeeded"
  488.             GoTo SkipOptions
  489.         EndIf
  490.     Else
  491.         Set CardVerifyIndex = $(!STF_NCDETCARD)
  492.         Debug-Output $(InfName)": Calling Param_VerifyCard"
  493.         Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  494.         IfStr(i) $($R0) == STATUS_SUCCESSFUL
  495.             Debug-Output $(InfName)": Param_VerifyCard succeeded"
  496.             GoTo SkipOptions
  497.         EndIf
  498.     EndIf
  499.  
  500.     Set from = AdapterOptions
  501.     Set to = SkipOptions
  502.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  503.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  504.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  505.         GoTo ShellCodeError
  506.     EndIf
  507.     Set Error = $($R0)
  508.     GoTo WarningMsg
  509.  
  510. ;***********************************************************************
  511. ;
  512. ;***********************************************************************
  513. SkipOptions =+
  514.     IfInt $(OldVersionExisted) == $(TRUE)
  515.         IfStr(i) $(!NTN_InstallMode) == configure
  516.             GoTo WriteParameters
  517.         EndIf
  518.     EndIf
  519.     StartWait
  520.     IfInt $(OldVersionExisted) == $(FALSE)
  521.         IfStr(i) $(!NTN_InstallMode) == "install"
  522.            IfStr(i) $(DoCopy) == "YES"
  523.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  524.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  525.                   GoTo ShellCodeError
  526.               Else-IfStr(i) $($R0) == STATUS_FAILED
  527.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  528.                   IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  529.                       GoTo ShellCodeError
  530.                   EndIf
  531.                   Set Error = $($R0)
  532.                   GoTo FatalError
  533.               Else-IfStr(i) $($R0) == STATUS_USERCANCEL
  534.                   GoTo SuccessfulOption
  535.               EndIf
  536.               Set SrcDir = $($R1)
  537.            EndIf
  538.  
  539.            Install "Install-Option"
  540.            IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  541.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  542.               IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  543.                   GoTo ShellCodeError
  544.               EndIf
  545.               Set Error = $($R0)
  546.               GoTo FatalError
  547.            EndIf
  548.         EndIf
  549.  
  550.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  551.             $(ProductSoftwareName), +
  552.             $(ProductSoftwareName), +
  553.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  554.             $(ProductSoftwareImagePath), "kernelautostart", "NDIS", {}, "",+
  555.             $(NetEventDLL)
  556.         Set OEM_ABANDON_SOFTWARE = TRUE
  557.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  558.             Debug-Output $(InfName)": ShellCode error"
  559.             GoTo ShellCodeError
  560.         EndIf
  561.         Set RegistryErrorIndex = $($R0)
  562.         Set KeyProduct      = $($R1)
  563.         Set SoftNetRulesKey = $($R2)
  564.         CloseRegKey $($R3)
  565.         CloseRegKey $($R4)
  566.         CloseRegKey $($R5)
  567.  
  568.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  569.             EndWait
  570.             Debug-Output $(InfName)": Registry error: add software components"
  571.             CloseRegKey $(KeyProduct)
  572.             CloseRegKey $(SoftNetRulesKey)
  573.             GoTo FatalRegistry
  574.         EndIf
  575.  
  576.         Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  577.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  578.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  579.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  580.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  581.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  582.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  583.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  584.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  585.             Debug-Output $(InfName)": ShellCode error."
  586.             GoTo ShellCodeError
  587.         EndIf
  588.         Set RegistryErrorIndex = $($R0)
  589.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  590.             EndWait
  591.             Debug-Output $(InfName)": Registry error: add value list."
  592.             CloseRegKey $(KeyProduct)
  593.             CloseRegKey $(SoftNetRulesKey)
  594.             GoTo FatalRegistry
  595.         EndIf
  596.  
  597.         Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  598.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  599.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  600.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  601.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, +
  602.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  603.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  604.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  605.             Debug-Output $(InfName)": ShellCode error."
  606.             GoTo ShellCodeError
  607.         EndIf
  608.         Set RegistryErrorIndex = $($R0)
  609.         CloseRegKey $(KeyProduct)
  610.         CloseRegKey $(SoftNetRulesKey)
  611.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  612.             EndWait
  613.             Debug-Output $(InfName)": Resgitry error: add value list."
  614.             GoTo FatalRegistry
  615.         EndIf
  616.     EndIf
  617.  
  618.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  619.     IfInt $($R4) != -1
  620.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  621.     EndIf
  622.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  623.         Debug-Output $(InfName)": Cannot add hardware component"
  624.         GoTo ShellCodeError
  625.     EndIf
  626.     Set RegistryErrorIndex = $($R0)
  627.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  628.         EndWait
  629.         Debug-Output $(InfName)": Registry error: add hardware component"
  630.         CloseRegKey $($R1)
  631.         CloseRegKey $($R2)
  632.         CloseRegKey $($R3)
  633.         GoTo FatalRegistry
  634.     EndIf
  635.  
  636.     Set KeyParameters = $($R3)
  637.     Set KeyAdapterRules = $($R2)
  638.     Set AdapterNumber = $($R4)
  639.     Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  640.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  641.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  642.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  643.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  644.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  645.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  646.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  647.         Debug-Output $(InfName)": ShellCode error"
  648.         GoTo ShellCodeError
  649.     EndIf
  650.     CloseRegKey $($R1)
  651.  
  652. ;;; You need one address entry in the list for each channel on your device.
  653. ;;; FIXME - at this point RAS requires there to be one logical line per address
  654. ;;; FIXME - so the address (channel) number is ignored and the line number is used
  655.     Set TapiAddressList = {$(AdapterNumber)" 1 0"}
  656.     IfStr(i) $(Option) == NiwRAS2
  657.         Set TapiAddressList = >($(TapiAddressList),$(AdapterNumber)" 2 0")
  658.     EndIf
  659.  
  660.     Set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  661.     Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  662.     Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
  663.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  664.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
  665.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  666.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  667.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  668.         Debug-Output $(InfName)": ShellCode error."
  669.         GoTo ShellCodeError
  670.     EndIf
  671.     Set RegistryErrorIndex = $($R0)
  672.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  673.         EndWait
  674.         Debug-Output $(InfName)": Resgitry error: add value list."
  675.         CloseRegKey $(KeyParameters)
  676.         CloseRegKey $(KeyAdapterRules)
  677.         GoTo FatalRegistry
  678.     EndIf
  679.     CloseRegKey $(KeyAdapterRules)
  680.  
  681.     GoTo WriteParameters
  682.  
  683. ;***********************************************************************
  684. ;
  685. ;***********************************************************************
  686. WriteParameters = +
  687.     Set IOBaseValue  = *($(IOADDR_Addr_List),~($(IOADDR_Hex_List),$(IOBaseAddress)))
  688.     Set NewValueList = {+
  689.                        {AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  690.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  691.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
  692.                        {DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  693.                           {ClockSpeed,$(NoTitle),$(!REG_VT_DWORD),$(ClockSpeed)},+
  694.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
  695.                        {DMAChannel,$(NoTitle),$(!REG_VT_DWORD),$(DMAChannel)},+
  696.                        {LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
  697.                        {LineRate,$(NoTitle),$(!REG_VT_DWORD),$(LineRate)},+
  698.                        {MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
  699.                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  700.                        {Port1Type,$(NoTitle),$(!REG_VT_SZ),$(Port1Type)},+
  701.                           {Port2Type,$(NoTitle),$(!REG_VT_SZ),$(Port2Type)}+
  702.                        }
  703. ;;;                       {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DebugFlags)},+
  704.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  705.     CloseRegKey $(KeyParameters)
  706.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  707.         Debug-Output $(InfName)": ShellCode error."
  708.         GoTo ShellCodeError
  709.     EndIf
  710.     Set RegistryErrorIndex = $($R0)
  711.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  712.         Debug-Output $(InfName)": Registry error: Add value list"
  713.         GoTo FatalRegistry
  714.     EndIf
  715.     ;
  716.     ; Skip TAPI/RAS setup if already installed.
  717.     ;
  718.     IfStr(i) $(!NTN_InstallMode) == configure
  719.         GoTo SuccessfulOption
  720.     EndIf
  721.     ;
  722.     ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\NiwRAS key
  723.     ;
  724.     OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey
  725.     shell "" NiCreateRegKey $(BaseKey) "TAPI DEVICES\NiwRAS"
  726.     IfStr(i) $($R0) != NO_ERROR
  727.         Debug-Output $(InfName)": Error creating registry key!"
  728.         GoTo FatalRegistry
  729.     EndIf
  730.     Set TapiDeviceKey = $($R1)
  731.     Set NewValueList = {+
  732.                        {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
  733.                        {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}}
  734.     Shell  $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
  735.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  736.         Debug-Output $(InfName)": ShellCode error."
  737.         GoTo ShellCodeError
  738.     EndIf
  739.     Set RegistryErrorIndex = $($R0)
  740.     IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  741.         Debug-Output $(InfName)": Registry error: Add value list"
  742.         GoTo FatalRegistry
  743.     EndIf
  744.     CloseRegKey $(TapiDeviceKey)
  745.     CloseRegKey $(BaseKey)
  746.     ;
  747.     ; if RAS is not installed, then shell ras setup INF file to install RAS
  748.     ; else invoke RAS to allow user to configure RAS for Switch56. 
  749.     ;
  750.     Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
  751.     Shell "oemnsvra.inf" CheckRasInstalled
  752.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  753.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  754.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
  755.                 "STATUS", $(InvokeRasError)
  756.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  757.             GoTo ShellCodeError
  758.         EndIf
  759.         GoTo SuccessfulOption
  760.     EndIf
  761.     Set RasInstalled = $($R0)
  762.     Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
  763.     ;
  764.     ; display a message to the user that RAS setup will now be invoked
  765.     ;
  766.     IfStr(i) $(RasInstalled) == FALSE
  767.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  768.                 $(InvokeRasSetupMsg)
  769.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  770.             GoTo SuccessfulOption
  771.         EndIf
  772.     Else
  773.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
  774.                 $(InvokeRasConfigMsg)
  775.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  776.             GoTo SuccessfulOption
  777.         EndIf
  778.     EndIf
  779.     ;
  780.     ; FIXME - RAS INF will not locate the files if it is spawned here.
  781.     ;
  782.     EndWait
  783.     GoTo SuccessfulOption
  784.  
  785.     ;
  786.     ; Set the flags based on whether this is an IDW installation
  787.     ;
  788.     IfStr(i) $(!STF_IDW) == TRUE
  789.         Set AddCopy  = NO
  790.         Set DoCopy   = NO
  791.         Set DoConfig = NO
  792.     Else
  793.         Set AddCopy  = YES
  794.         Set DoCopy   = YES
  795.         Set DoConfig = YES
  796.     EndIf
  797.     ;
  798.     ; change the global install mode flag to configure if RAS is already installed
  799.     ;
  800.     IfStr(i) $(RasInstalled) == TRUE
  801.             Set SaveNTN_InstallMode = $(!NTN_InstallMode)
  802.             Set !NTN_InstallMode = configure
  803.     EndIf
  804.     ;
  805.     ; now invoke RAS setup to do the right thing
  806.     ;
  807.     Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig)
  808.     ;
  809.     ; restore the global instal mode flag if it was changed
  810.     ;
  811.     IfStr(i) $(RasInstalled) == TRUE
  812.             Set !NTN_InstallMode = $(SaveNTN_InstallMode)
  813.     EndIf
  814.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  815.         Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
  816.         Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
  817.                 $(InvokeRasError)
  818.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  819.             GoTo ShellCodeError
  820.         EndIf
  821.         GoTo SuccessfulOption
  822.     EndIf
  823.  
  824.     EndWait
  825.     GoTo SuccessfulOption
  826.  
  827. ;***********************************************************************
  828. ;
  829. ;***********************************************************************
  830. BindingAdapter =+
  831.     Set Error = "Binding: Sorry, not yet implemented."
  832.     GoTo FatalError
  833.  
  834. ;***********************************************************************
  835. ;
  836. ;***********************************************************************
  837. RemoveAdapter = +
  838.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  839.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  840.             $(ProductSoftwareName)
  841.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  842.             Debug-Output $(InfName)": ShellCode error"
  843.             GoTo ShellCodeError
  844.         EndIf
  845.         Set RegistryErrorIndex = $($R0)
  846.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  847.             GoTo FatalRegistry
  848.         EndIf
  849.     Else
  850.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  851.             $(ProductSoftwareName), $(!NTN_RegBase)
  852.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  853.             Debug-Output $(InfName)": ShellCode error"
  854.             GoTo ShellCodeError
  855.         EndIf
  856.         Set RegistryErrorIndex = $($R0)
  857.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  858.             GoTo FatalRegistry
  859.         EndIf
  860.     EndIf
  861.     GoTo end
  862.  
  863. ;***********************************************************************
  864. ;
  865. ;***********************************************************************
  866. UpgradeSoftware = +
  867.     IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
  868.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  869.         IfStr $(KeyProduct) != $(KeyNull)
  870.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  871.             Set Version = *($(VersionInfo), 4)
  872.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  873.             IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  874.                 Debug-Output $(InfName)": ShellCode error"
  875.                 GoTo ShellCodeError
  876.             EndIf
  877.             Set !UG_Filename = $($R0)
  878.             IfStr(i) $(!UG_Filename) != ""
  879.                 install "Install-Update"
  880.                 IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  881.                     GoTo FatalError
  882.                 EndIf
  883.             EndIf
  884.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  885.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  886.             IfInt $(Version) != $(ProductVersion)
  887.             EndIf
  888.             CloseRegKey $(KeyProduct)
  889.         Else
  890.             GoTo FatalRegistry
  891.         EndIf
  892.     Else
  893.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  894.               $(MAXIMUM_ALLOWED) NetworkCardKey
  895.         IfStr(i) $(NetworkCardKey) != $(KeyNull)
  896.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  897.             Set ServiceName = *($(ServiceNameInfo), 4)
  898.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  899.                 $(MAXIMUM_ALLOWED) NetRuleKey
  900.             IfStr(i) $(NetRuleKey) != $(KeyNull)
  901.             Else
  902.                 GoTo FatalRegistry
  903.             EndIf
  904.             CloseRegKey $(NetRules)
  905.             CloseRegKey $(NetworkCardKey)
  906.         Else
  907.             GoTo FatalRegistry
  908.         EndIf
  909.         OpenRegKey $(!REG_H_LOCAL) "" +
  910.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  911.               $(MAXIMUM_ALLOWED) ServiceKey
  912.         IfStr(i) $(ServiceKey) != $(KeyNull)
  913.             CloseRegKey $(ServiceKey)
  914.         Else
  915.             GoTo FatalRegistry
  916.         EndIf
  917.     EndIf
  918.     GoTo end
  919.  
  920. ;***********************************************************************
  921. ;
  922. ;***********************************************************************
  923. SuccessfulOption = +
  924.     GoTo end
  925.  
  926. ;***********************************************************************
  927. ;
  928. ;***********************************************************************
  929. Abandon = +
  930.     ForListDo $(OEM_ABANDON_OPTIONS)
  931.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  932.             $(ProductSoftwareName), $($)
  933.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  934.             Debug-Output $(InfName)": ShellCode error"
  935.             GoTo ShellCodeError
  936.         EndIf
  937.         Set RegistryErrorIndex = $($R0)
  938.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  939.             GoTo FatalRegistry
  940.         EndIf
  941.     EndForListDo
  942.     IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  943.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  944.             $(ProductSoftwareName), FALSE
  945.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  946.             Debug-Output $(InfName)": ShellCode error"
  947.             GoTo ShellCodeError
  948.         EndIf
  949.         Set RegistryErrorIndex = $($R0)
  950.         IfStr(i) $(RegistryErrorIndex) != NO_ERROR
  951.             GoTo FatalRegistry
  952.         EndIf
  953.     EndIf
  954.     GoTo end
  955.  
  956. ;***********************************************************************
  957. ;
  958. ;***********************************************************************
  959. WarningMsg = +
  960.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  961.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  962.         GoTo ShellCodeError
  963.     EndIf
  964.     IfStr(i) $($R1) == "OK"
  965.         GoTo $(to)
  966.     Else-IfStr(i) $($R1) == "CANCEL"
  967.         GoTo $(from)
  968.     EndIf
  969.     GoTo end
  970.  
  971. ;***********************************************************************
  972. ;
  973. ;***********************************************************************
  974. NonFatalInfo = +
  975.     Set Severity = STATUS
  976.     Set CommonStatus = STATUS_USERCANCEL
  977.     IfStr(i) $(Error) == ""
  978.         Set Severity = NONFATAL
  979.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  980.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  981.             GoTo ShellCodeError
  982.         EndIf
  983.         Set Error = $($R0)
  984.     EndIf
  985.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  986.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  987.         GoTo ShellCodeError
  988.     EndIf
  989.     IfStr(i) $($R1) == "OK"
  990.         GoTo $(from)
  991.     EndIf
  992.     GoTo end
  993.  
  994. ;***********************************************************************
  995. ;
  996. ;***********************************************************************
  997. FatalRegistry = +
  998.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  999.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1000.         GoTo ShellCodeError
  1001.     EndIf
  1002.     Set Error = $($R0)
  1003.     GoTo FatalError
  1004.  
  1005. ;***********************************************************************
  1006. ;
  1007. ;***********************************************************************
  1008. FatalDetect = +
  1009.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1010.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1011.         Debug-Output $(InfName)": ShellCode error: cannot get an error string."
  1012.         GoTo ShellCodeError
  1013.     EndIf
  1014.     Set Error = $($R0)
  1015.     GoTo FatalError
  1016.  
  1017. ;***********************************************************************
  1018. ;
  1019. ;***********************************************************************
  1020. FatalError = +
  1021.     IfStr(i) $(Error) == ""
  1022.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1023.         IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1024.             GoTo ShellCodeError
  1025.         EndIf
  1026.         Set Error = $($R0)
  1027.     EndIf
  1028.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1029.     IfInt $($ShellCode) != $(!SHELL_CODE_OK)
  1030.         GoTo ShellCodeError
  1031.     EndIf
  1032.     GoTo SetFailed
  1033.  
  1034. ;***********************************************************************
  1035. ;
  1036. ;***********************************************************************
  1037. ShellCodeError = +
  1038.     Set DlgType      = "MessageBox"
  1039.     Set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1040.     Set STF_MB_TEXT  = $(ShellCodeErrorText)
  1041.     Set STF_MB_TYPE  = 1
  1042.     Set STF_MB_ICON  = 3
  1043.     Set STF_MB_DEF   = 1
  1044.     UI Start "Error Message"
  1045.     GoTo SetFailed
  1046.  
  1047. ;***********************************************************************
  1048. ;
  1049. ;***********************************************************************
  1050. SetFailed = +
  1051.     Set CommonStatus = STATUS_FAILED
  1052.     IfStr(i) $(OEM_ABANDON_ON) == TRUE
  1053.         Set OEM_ABANDON_ON = FALSE
  1054.         GoTo Abandon
  1055.     EndIf
  1056.     GoTo end
  1057.  
  1058. ;***********************************************************************
  1059. ;
  1060. ;***********************************************************************
  1061. end = +
  1062.     Set !DebugOutputControl = $(OldDebugControl)
  1063.     Return $(CommonStatus)
  1064.  
  1065. ;***********************************************************************
  1066. ;
  1067. ;***********************************************************************
  1068. [NiCreateRegKey]
  1069.     Debug-Output $(InfName)": Entering [NiCreateRegKey]"
  1070.     Set ECR_Result          = NO_ERROR
  1071.     Set ECR_BaseKeyHandle   = $($0)
  1072.     Set ECR_NewPath         = $($1)
  1073.     Set KeyNull             = ""
  1074.     Set MAXIMUM_ALLOWED     = 33554432
  1075.  
  1076.     Debug-Output $(InfName)": NiCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1077.     Debug-Output $(InfName)":                  ECR_NewPath       = "$(ECR_NewPath)
  1078.     Debug-Output $(InfName)":                  MAXIMUM_ALLOWED   = "$(MAXIMUM_ALLOWED)
  1079.     Debug-Output $(InfName)":                  KeyNull           = "$(KeyNull)
  1080.  
  1081.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1082.                ECR_BaseKey
  1083.     Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
  1084.     Debug-Output $(InfName)":     OpenRegKey returned "$($R0)
  1085.     IfStr $(ECR_BaseKey) == $(KeyNull)
  1086.         Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
  1087.     Else
  1088.         Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
  1089.         Set ECR_KeyHandle = $(ECR_BaseKey)
  1090.         GoTo  ECR_Return
  1091.     EndIf
  1092.  
  1093.     Set ECR_TmpPath = ""
  1094.     Split-String $(ECR_NewPath) "\" ECR_PList
  1095.     Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
  1096.     ForListDo $(ECR_PList)
  1097.         IfStr(i) $($) != "\"
  1098.             IfInt $(#) == 1
  1099.                 Set ECR_TmpPath = $($)
  1100.             Else
  1101.                 Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1102.             EndIf
  1103.             Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
  1104.             OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1105.             IfStr $(ECR_BaseKey) == $(KeyNull)
  1106.                 Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
  1107.                 CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1108.                 IfStr(i) $(ECR_KeyHandle) == $(KeyNull)
  1109.                     Set ECR_Result = $($R0)
  1110.                     GoTo ECR_Return
  1111.                 EndIf
  1112.             EndIf
  1113.         EndIf
  1114.     EndForListDo
  1115. ECR_Return = +
  1116.     Return $(ECR_Result) $(ECR_KeyHandle)
  1117.  
  1118. ;***********************************************************************
  1119. ;
  1120. ;***********************************************************************
  1121. [DebugConfiguration]
  1122.     Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
  1123.     Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
  1124.     Debug-Output $(!p:InfName)": IOBaseAddress  is "$(!p:IOBaseAddress)
  1125.     Debug-Output $(!p:InfName)": DMAChannel is "$(!p:DMAChannel)
  1126.     Debug-Output $(!p:InfName)": LineType        is "$(!p:LineType)
  1127.     Debug-Output $(!p:InfName)": LineRate        is "$(!p:LineRate)
  1128.     Return
  1129.  
  1130. ;***********************************************************************
  1131. ;
  1132. ;***********************************************************************
  1133. [Install-Option]
  1134.     Set STF_VITAL = ""
  1135.     IfStr(i) $(AddCopy) == "YES"
  1136.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1137.     AddSectionFilesToCopyList Files-$(Option)Help $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1138.     EndIf
  1139.     IfStr(i) $(DoCopy) == "YES"
  1140.        Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1141.        CopyFilesInCopyList
  1142. ;WHQL
  1143.     else
  1144.         LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(SrcDir)\NIWHELP.HLP $(!STF_WINDOWSSYSPATH)\NIWHELP.HLP
  1145.     EndIf
  1146.     Exit
  1147.  
  1148. ;***********************************************************************
  1149. ;
  1150. ;***********************************************************************
  1151. [Install-Update]
  1152.    Set STF_VITAL        = ""
  1153.    Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1154.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1155.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1156.    Set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1157.    CopyFilesInCopyList
  1158.    Exit
  1159.  
  1160. ;***********************************************************************
  1161. ;
  1162. ;***********************************************************************
  1163. [Source Media Descriptions]
  1164.     1  = "Windows NT Setup Disk #1"
  1165.  
  1166. [Signature]
  1167.     FileType = MICROSOFT_DRVLIB_FILE
  1168. [GetSignature]
  1169.     read-syms Signature
  1170.     return $(FileType)
  1171.  
  1172. ;***********************************************************************
  1173. ;
  1174. ;***********************************************************************
  1175. [ProductType]
  1176.     STF_PRODUCT         = Winnt
  1177.     STF_PLATFORM        = I386
  1178.  
  1179. ;***********************************************************************
  1180. ;
  1181. ;***********************************************************************
  1182. [Files-Inf]
  1183.     1, oemsetnt.inf, SIZE=1000, RENAME=$(!UG_Filename)
  1184.  
  1185. ;***********************************************************************
  1186. ;
  1187. ;***********************************************************************
  1188. [Files-NiwRAS]
  1189.     1, NiwRAS.SYS, SIZE=65536
  1190. ;WHQL
  1191. [Files-NiwRASHelp]
  1192.     1, NIWHELP.HLP, SIZE=65536
  1193.  
  1194. ;***********************************************************************
  1195. ;
  1196. ;***********************************************************************
  1197. [LanguagesSupported]
  1198.     ENG
  1199.  
  1200. ;***********************************************************************
  1201. ;
  1202. ;***********************************************************************
  1203. [OptionsTextENG]
  1204.     NiwRAS             = "Niwot Networks NiwRAS"
  1205.  
  1206. ;***********************************************************************
  1207. ;
  1208. ;***********************************************************************
  1209. [FileConstantsENG]
  1210.     ProCaption          = "Windows NT Setup"
  1211.     ProCancel           = "Cancel"
  1212.     ProCancelMsg        = "Windows NT Networking is not correctly installed.  "+
  1213.                           "Are you sure you want to cancel copying files?"
  1214.     ProCancelCap        = "Network Setup Message"
  1215.     ProText1            = "Copying:"
  1216.     ProText2            = "To:"
  1217.  
  1218.     FunctionTitleNiwRAS                = "Niwot Networks NiwRAS Card Setup"
  1219.     ProductSoftwareDescription          = "Niwot Networks NiwRAS Driver"
  1220.     ProductHardwareNiwRASDescription   = "Niwot Networks NiwRAS"
  1221.     ProductSoftwareTitle                = "Niwot Networks NiwRAS Driver"
  1222.     ProductHardwareNiwRASTitle         = "Niwot Networks NiwRAS Adapter"
  1223.  
  1224.     ShellCodeErrorTitle                 = "Error: "$(FunctionTitle)$(Option))
  1225.     ShellCodeErrorText                  = "Shell Code Error."
  1226.  
  1227. ;***********************************************************************
  1228. ;
  1229. ;***********************************************************************
  1230. [DialogConstantsENG]
  1231.     Help                = "&Help"
  1232.     Exit                = "Cancel"
  1233.     OK                  = "OK"
  1234.     HelpContext         = 10
  1235.     Continue            = "Continue"
  1236.     Cancel              = "Cancel"
  1237.  
  1238. ;***********************************************************************
  1239. ;
  1240. ;***********************************************************************
  1241. [FileDependentDlgENG]
  1242.     DlgType             = "MultiCombo"
  1243.     DlgTemplate         = "WD"
  1244.     Caption             = "NiwRAS 1"
  1245.     
  1246.     Combo1Label         = "&Interrupt Level:"
  1247.     Combo1List          = $(Interrupt_List)
  1248.     Combo1Out           = $(InterruptNumber)
  1249.  
  1250.     Combo2Label         = "&IO Base Address:"
  1251.     Combo2List          = $(IOADDR_Hex_List)
  1252.     Combo2Out           = $(IOBaseAddress)
  1253.  
  1254.     Combo3Label         = "&DMA Channel Number:"
  1255.     Combo3List          = $(DMA_Channel_List)
  1256.     Combo3Out           = $(DMAChannel)
  1257.  
  1258.     ComboListItemsIn    = {Combo1List, Combo2List, Combo3List}
  1259.     ComboListItemsOut   = {Combo1Out, Combo2Out, Combo3Out}
  1260.  
  1261.     EditTextIn          = ""
  1262.     EditTextLim         = ""
  1263.     CBOptionsGreyed     = {}
  1264.     NotifyFields        = {NO, NO, NO, NO}
  1265.     HelpContext         = 10
  1266. ;***********************************************************************
  1267. ;
  1268. ;***********************************************************************
  1269. [CardDependentDlgENG]
  1270.     DlgType = "MultiCombo"
  1271.     DlgTemplate = "WD"
  1272.     Caption = "NiwRAS 2"
  1273.     Combo1Label = "Clock(0=extrn):"
  1274.     Combo1List = $(ClockSpeedList)
  1275.     Combo1Out  = $(ClockSpeed)
  1276.     Combo2Label = "Port 1 Type"
  1277.     Combo2List = $(Port1TypeList)
  1278.     Combo2Out  = $(Port1Type)
  1279.     Combo3Label = "Port 2 Type"
  1280.     Combo3List = $(Port2TypeList)
  1281.     Combo3Out  = $(Port2Type)
  1282.     ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  1283.     ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  1284.  
  1285.     EditTextIn = ""
  1286.     EditTextLim = ""
  1287.     NotifyFields = {NO, NO, NO, NO}
  1288.     HelpContext         = 10
  1289.  
  1290. ;***********************************************************************
  1291. ;
  1292. ;***********************************************************************
  1293. [InvokeRasDlgENG]
  1294.     InvokeRasSetupMsg   = "Niwot Networks NiwRAS setup is complete. "+
  1295.                           "Remote Access Services (RAS) must now be installed. "+
  1296.                           "Please configure the NiwRASSync ports in RAS "+
  1297.                           "setup to enable you to use RAS over the NiwRAS."
  1298.     InvokeRasConfigMsg  = "Niwot Networks NiwRAS setup is complete. "+
  1299.                           "Remote Access Services (RAS) setup must now be invoked. "+
  1300.                           "Please configure the NiwRASSync ports in RAS "+
  1301.                           "setup to enable you to use RAS over the NiwRAS."
  1302.     InvokeRasError      = "Niwot Networks NiwRAS setup encountered an error "+
  1303.                           "while invoking the RAS setup INF file (OEMNSVRA.INF). "+
  1304.                           "Please make sure that the file is present in the "+
  1305.                           "System32 directory and is the proper file." 
  1306.  
  1307.